-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for organization API #265
Conversation
Awesome! thank you for the PR.
Looks like admin API key is also a bearer token, then existing Current behavior to read OPENAI_API_KEY env var on
Sounds good. I see the same top level grouping here https://platform.openai.com/docs/api-reference/administration
Yes having 1-on-1 naming from spec to Rust types helps with single source of truth and on going maintenance. There are nested objects in spec which don't have name i usually go with
Isn't Please consider adding a self contained example for this - it helps me test (& maintain) that serialization and de serialization of new types are working well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that this PR still needs work, and I have some bandwidth to make progress on it.
Hence I'm merging this, thank you for taking initiative on this one!
Thanks, I got caught up in my work and open source fell by the wayside 😅 I appreciate the completion and merge! |
😄 That happens right. You did a lot of heavy lifting in this one so I was able to pick up the remaining APIs which were not implemented for so long. |
* Implement `invites` * Consistently inline format * Implement `users` * Replace `InviteRole` with generic `OrganizationRole` * Implement `projects` * Update requests to use builder * Remove `default` from builder * Update `projects` to include verification information (https://help.openai.com/en/articles/9824607-api-platform-verifications) * Implement `project_users` --------- Co-authored-by: Himanshu Neema <[email protected]> (cherry picked from commit ac204a3)
Fixes #260
This PR currently only implements the
invites
module of the organization API. I'd like to get clarification on some details before I continue.OPENAI_ADMIN_KEY
in documentation. I'm thinking that I should write an additional method onOpenAIConfig
to use this environment variable, perhapswith_admin_key
. What do you think?organization
APIs are organized under that endpoint. As with theassistants
module, I'm choosing to keep them in the flat namespace.cargo-msrv
, the current MSRV is 1.70.0. If this is intended, it should be indicated somewhere in the README.